package io低级流or节点流;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

/***/
public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fo = new FileOutputStream("./DA78.txt");
        String a="哈老魏";
        //把a的字符串按照成UTF_8的编码转换成字节数组
        byte[] by = a.getBytes(StandardCharsets.UTF_8);

        fo.write(by);
        fo.write(",你好喔".getBytes(StandardCharsets.UTF_8));
        System.out.println("写出完毕");
        fo.close();
    }
}
